From 3e784fed0148c4ec24aa8b2b8ca53f2d9d9bc543 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 18 Mar 2012 01:47:21 +0100 Subject: Fix some severe braindamage It started as a buxfix session, but the more I dug into some ancient code, the more I had to change. Well, first and foremost, this fixes a crash in PicturesWidget. Trying to display the mappings of the selected picture in a different color never was a good idea. Show them in the statusbar instead. While looking at the statusBar code, make PictureWidget emit signals to show the total size and number of selected items. Then I noticed some really, really braindamaged connection madness in the Shemov constructor. Instead of doing all the work in SheMov itself, have the widgets emit signals. This should have been several commits, but one lead to another... --- pictureswidget.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pictureswidget.h') diff --git a/pictureswidget.h b/pictureswidget.h index cdc40b5..a8463a4 100644 --- a/pictureswidget.h +++ b/pictureswidget.h @@ -41,7 +41,6 @@ class PicturesWidget : public QWidget { void showPicViewer(bool toggled); private slots: - void setMappingColors(); void editMappings(); void constructWindowTitle(); void showInPicViewer(const QModelIndex &idx); @@ -82,10 +81,12 @@ class PictureView : public QTreeView { virtual void contextMenuEvent(QContextMenuEvent *e); private slots: - void setFileMappings(); + void selectedFilesChanged(); signals: - void newFileMappigs(); + void newMappings(QString); + void numSelected(int); + void selectedSize(qint64); void editPicsMappings(); private: @@ -96,6 +97,7 @@ class PictureView : public QTreeView { int mCursorOffset; QList mFilesMappings; PictureViewer2 *mPV; + MappingTreeModel *mMappingTreeModel; }; class PicFilesModel : public SmTreeModel { -- cgit v1.2.3-70-g09d2