mirror of
https://github.com/markdavidlong/AppleSAWS.git
synced 2024-11-22 00:31:04 +00:00
Preserve catalog widget size when DiskTools are hidden
This commit is contained in:
parent
9e7b408263
commit
315cc2a4af
@ -17,6 +17,7 @@ DiskExplorer::DiskExplorer(QWidget *parent) : QMainWindow(parent)
|
|||||||
m_action_Unload_Disk_Image = 0;
|
m_action_Unload_Disk_Image = 0;
|
||||||
m_disk = 0;
|
m_disk = 0;
|
||||||
m_horizSizePref = -1;
|
m_horizSizePref = -1;
|
||||||
|
m_toolsHidden = true;
|
||||||
|
|
||||||
resize(300,800);
|
resize(300,800);
|
||||||
initUi();
|
initUi();
|
||||||
@ -190,6 +191,7 @@ void DiskExplorer::handleDiskItemSelectedDefaultOpen(DiskFile *disk, FileDescrip
|
|||||||
|
|
||||||
void DiskExplorer::setDiskToolsVisible(bool visible)
|
void DiskExplorer::setDiskToolsVisible(bool visible)
|
||||||
{
|
{
|
||||||
|
m_toolsHidden = !visible;
|
||||||
if (visible)
|
if (visible)
|
||||||
{
|
{
|
||||||
m_gridLayout->setColumnStretch(0,4);
|
m_gridLayout->setColumnStretch(0,4);
|
||||||
@ -233,7 +235,6 @@ void DiskExplorer::showEvent(QShowEvent *event)
|
|||||||
if (m_horizSizePref == -1)
|
if (m_horizSizePref == -1)
|
||||||
{
|
{
|
||||||
m_horizSizePref = this->width();
|
m_horizSizePref = this->width();
|
||||||
qDebug() << "New Horiz Size Pref = " << m_horizSizePref;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,5 +249,11 @@ void DiskExplorer::closeEvent(QCloseEvent *)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DiskExplorer::resizeEvent(QResizeEvent *)
|
||||||
|
{
|
||||||
|
if (m_toolsHidden)
|
||||||
|
{
|
||||||
|
m_horizSizePref = this->width();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ protected:
|
|||||||
|
|
||||||
void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event);
|
||||||
void closeEvent(QCloseEvent *);
|
void closeEvent(QCloseEvent *);
|
||||||
|
void resizeEvent(QResizeEvent *);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void doResize();
|
void doResize();
|
||||||
@ -72,6 +73,8 @@ private:
|
|||||||
int m_horizSizePref;
|
int m_horizSizePref;
|
||||||
|
|
||||||
QList<ViewerBase*> m_viewerList;
|
QList<ViewerBase*> m_viewerList;
|
||||||
|
|
||||||
|
bool m_toolsHidden;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DISKEXPLORER_H
|
#endif // DISKEXPLORER_H
|
||||||
|
@ -29,6 +29,7 @@ public:
|
|||||||
|
|
||||||
QString getPotentialLabel(quint16 address);
|
QString getPotentialLabel(quint16 address);
|
||||||
virtual bool optionsMenuItems(QMenu *);
|
virtual bool optionsMenuItems(QMenu *);
|
||||||
|
|
||||||
bool canPrint() const;
|
bool canPrint() const;
|
||||||
bool canExport() const;
|
bool canExport() const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user