Changeset 07d744c in sasview for src/sas/qtgui/MainWindow


Ignore:
Timestamp:
Jan 14, 2019 6:45:33 AM (6 years ago)
Author:
wojciech
Branches:
ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
Children:
593b536d
Parents:
1c98850 (diff), c3fc919 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ESS_GUI' of https://github.com/SasView/sasview into ESS_GUI

Location:
src/sas/qtgui/MainWindow
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/AboutBox.py

    r7385fec r33c0561  
    11import functools 
    2 from PyQt5 import QtWidgets 
     2from PyQt5 import QtWidgets, QtCore 
    33 
    44import sas.sasview 
     
    1414        super(AboutBox, self).__init__(parent) 
    1515        self.setupUi(self) 
     16        # disable the context help icon 
     17        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) 
    1618 
    1719        self.setWindowTitle("About") 
  • src/sas/qtgui/MainWindow/CategoryManager.py

    r3d18691 r33c0561  
    135135        super(CategoryManager, self).__init__(parent) 
    136136        self.setupUi(self) 
     137 
     138        # disable the context help icon 
     139        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) 
    137140 
    138141        self.communicator = manager.communicator() 
     
    327330        super(ChangeCategory, self).__init__(parent) 
    328331        self.setupUi(self) 
     332        # disable the context help icon 
     333        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) 
    329334 
    330335        self.model = model 
  • src/sas/qtgui/MainWindow/DataExplorer.py

    r04a884a rd1ad101  
    640640        # Figure out which rows are checked 
    641641        ind = -1 
    642         # Use 'while' so the row count is forced at every iteration 
     642 
     643        deleted_items = [] 
     644        deleted_names = [] 
    643645        while ind < self.theory_model.rowCount(): 
    644646            ind += 1 
    645647            item = self.theory_model.item(ind) 
     648 
    646649            if item and item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 
    647650                # Delete these rows from the model 
     651                deleted_names.append(str(self.theory_model.item(ind).text())) 
     652                deleted_items.append(item) 
     653 
    648654                self.theory_model.removeRow(ind) 
    649655                # Decrement index since we just deleted it 
    650656                ind -= 1 
    651657 
    652         # pass temporarily kept as a breakpoint anchor 
    653         pass 
     658        # Let others know we deleted data 
     659        self.communicator.dataDeletedSignal.emit(deleted_items) 
     660 
     661        # update stored_data 
     662        self.manager.update_stored_data(deleted_names) 
    654663 
    655664    def sendData(self, event=None): 
     
    18101819            raise AttributeError(msg) 
    18111820 
    1812         # Check if there are any other items for this tab 
    1813         # If so, delete them 
     1821        # Check if there exists an item for this tab 
     1822        # If so, replace it 
    18141823        current_tab_name = model_item.text() 
    18151824        for current_index in range(self.theory_model.rowCount()): 
    1816             if current_tab_name == self.theory_model.item(current_index).text(): 
    1817                 self.theory_model.removeRow(current_index) 
    1818                 break 
    1819         # send in the new item 
     1825            current_item = self.theory_model.item(current_index) 
     1826            if current_tab_name == current_item.text(): 
     1827                # replace data instead 
     1828                new_data = GuiUtils.dataFromItem(model_item) 
     1829                current_item.child(0).setData(new_data) 
     1830                return current_item 
     1831 
     1832        # add the new item to the model 
    18201833        self.theory_model.appendRow(model_item) 
     1834        return model_item 
    18211835 
    18221836    def deleteIntermediateTheoryPlotsByModelID(self, model_id): 
  • src/sas/qtgui/MainWindow/GuiManager.py

    rb1626bea r33c0561  
    5959        QDialog.__init__(self, parent) 
    6060        self.setupUi(self) 
     61        # disable the context help icon 
     62        self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) 
     63 
    6164 
    6265class GuiManager(object): 
     
    10491052        Send the request to the DataExplorer for updating the theory model. 
    10501053        """ 
    1051         self.filesWidget.updateTheoryFromPerspective(index) 
     1054        item = self.filesWidget.updateTheoryFromPerspective(index) 
     1055        # Now notify the perspective that the item was/wasn't replaced 
     1056        per = self.perspective() 
     1057        if not isinstance(per, FittingWindow): 
     1058            # currently only fitting supports generation of theories. 
     1059            return 
     1060        per.currentTab.setTheoryItem(item) 
    10521061 
    10531062    def deleteIntermediateTheoryPlotsByModelID(self, model_id): 
  • src/sas/qtgui/MainWindow/MainWindow.py

    r09b7da68 r33c0561  
    6060    splash.show() 
    6161    app.setAttribute(Qt.AA_EnableHighDpiScaling) 
     62 
    6263    # fix for pyinstaller packages app to avoid ReactorAlreadyInstalledError 
    6364    import sys 
  • src/sas/qtgui/MainWindow/UI/MainWindowUI.ui

    r09b7da68 rc3fc919  
    7575    <addaction name="actionHide_LogExplorer"/> 
    7676    <addaction name="separator"/> 
    77     <addaction name="actionMinimizePlots"/> 
    78     <addaction name="actionClosePlots"/> 
    79     <addaction name="separator"/> 
    8077    <addaction name="actionStartup_Settings"/> 
    8178   </widget> 
     
    129126    <addaction name="actionNext"/> 
    130127    <addaction name="actionPrevious"/> 
     128     <addaction name="separator"/> 
     129     <addaction name="actionMinimizePlots"/> 
     130     <addaction name="actionClosePlots"/> 
    131131   </widget> 
    132132   <widget class="QMenu" name="menuAnalysis"> 
Note: See TracChangeset for help on using the changeset viewer.