SVN commit 498769 by cgilles:
digikam from trunk : If an album item is renamed, toogle properly image properties side bar. CCMAIL: [hidden email] M +4 -1 albumiconview.cpp M +76 -62 digikamview.cpp --- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #498768:498769 @@ -120,7 +120,8 @@ { public: - void init() { + void init() + { imageLister = 0; currentAlbum = 0; albumSettings = 0; @@ -780,6 +781,8 @@ { d->imageLister->setNameFilter(settings->getAllFileFilter()); } + + signalItemsAdded(); } void AlbumIconView::slotDeleteSelectedItems() --- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #498768:498769 @@ -70,18 +70,14 @@ DigikamView::DigikamView(QWidget *parent) : QHBox(parent) { - mParent = static_cast<DigikamApp *>(parent); - - mAlbumMan = AlbumManager::instance(); - + mParent = static_cast<DigikamApp *>(parent); + mAlbumMan = AlbumManager::instance(); mMainSidebar = new Digikam::Sidebar(this, Digikam::Sidebar::Left); + mSplitter = new QSplitter(this); - mSplitter = new QSplitter(this); - mMainSidebar->setSplitter(mSplitter); - mIconView = new AlbumIconView(mSplitter); - + mIconView = new AlbumIconView(mSplitter); mRightSidebar = new Digikam::ImagePropertiesSideBarDB(this, mSplitter, Digikam::Sidebar::Right, true, true); // To the left. @@ -140,12 +136,15 @@ // -- IconView Connections ------------------------------------- - connect(mIconView, SIGNAL(signalSelectionChanged()), + connect(mIconView, SIGNAL(signalSelectionChanged()), this, SLOT(slot_imageSelected())); - connect(mIconView, SIGNAL(signalItemsAdded()), + connect(mIconView, SIGNAL(signalItemsAdded()), + this, SLOT(slot_imageSelected())); + + connect(mIconView, SIGNAL(signalItemsAdded()), this, SLOT(slot_albumHighlight())); - + connect(mTagFolderView, SIGNAL(signalTagsAssigned()), mIconView->viewport(), SLOT(update())); @@ -225,11 +224,11 @@ IconItem* prevItem = 0; AlbumIconItem *currItem = mIconView->firstSelectedItem(); if (currItem) - { + { prevItem = currItem->prevItem(); if (prevItem) mIconView->setCurrentItem(prevItem); - } + } } void DigikamView::slotNextItem(void) @@ -237,11 +236,11 @@ IconItem* nextItem = 0; AlbumIconItem *currItem = mIconView->firstSelectedItem(); if (currItem) - { + { nextItem = currItem->nextItem(); if (nextItem) mIconView->setCurrentItem(nextItem); - } + } } void DigikamView::slotLastItem(void) @@ -452,7 +451,8 @@ { mRightSidebar->noCurrentItem(); - if (!album) { + if (!album) + { mIconView->setAlbum(0); emit signal_albumSelected(false); emit signal_tagSelected(false); @@ -524,29 +524,34 @@ ThumbnailSize thumbSize; - switch(mIconView->thumbnailSize().size()) { - - case (ThumbnailSize::Small): { - thumbSize = ThumbnailSize(ThumbnailSize::Medium); - break; + switch(mIconView->thumbnailSize().size()) + { + case (ThumbnailSize::Small): + { + thumbSize = ThumbnailSize(ThumbnailSize::Medium); + break; + } + case (ThumbnailSize::Medium): + { + thumbSize = ThumbnailSize(ThumbnailSize::Large); + break; + } + case (ThumbnailSize::Large): + { + thumbSize = ThumbnailSize(ThumbnailSize::Huge); + break; + } + case (ThumbnailSize::Huge): + { + thumbSize = ThumbnailSize(ThumbnailSize::Huge); + break; + } + default: + return; } - case (ThumbnailSize::Medium): { - thumbSize = ThumbnailSize(ThumbnailSize::Large); - break; - } - case (ThumbnailSize::Large): { - thumbSize = ThumbnailSize(ThumbnailSize::Huge); - break; - } - case (ThumbnailSize::Huge): { - thumbSize = ThumbnailSize(ThumbnailSize::Huge); - break; - } - default: - return; - } - if (thumbSize.size() == ThumbnailSize::Huge) { + if (thumbSize.size() == ThumbnailSize::Huge) + { mParent->enableThumbSizePlusAction(false); } mParent->enableThumbSizeMinusAction(true); @@ -565,29 +570,34 @@ ThumbnailSize thumbSize; - switch(mIconView->thumbnailSize().size()) { - - case (ThumbnailSize::Small): { - thumbSize = ThumbnailSize(ThumbnailSize::Small); - break; + switch(mIconView->thumbnailSize().size()) + { + case (ThumbnailSize::Small): + { + thumbSize = ThumbnailSize(ThumbnailSize::Small); + break; + } + case (ThumbnailSize::Medium): + { + thumbSize = ThumbnailSize(ThumbnailSize::Small); + break; + } + case (ThumbnailSize::Large): + { + thumbSize = ThumbnailSize(ThumbnailSize::Medium); + break; + } + case (ThumbnailSize::Huge): + { + thumbSize = ThumbnailSize(ThumbnailSize::Large); + break; + } + default: + return; } - case (ThumbnailSize::Medium): { - thumbSize = ThumbnailSize(ThumbnailSize::Small); - break; - } - case (ThumbnailSize::Large): { - thumbSize = ThumbnailSize(ThumbnailSize::Medium); - break; - } - case (ThumbnailSize::Huge): { - thumbSize = ThumbnailSize(ThumbnailSize::Large); - break; - } - default: - return; - } - if (thumbSize.size() == ThumbnailSize::Small) { + if (thumbSize.size() == ThumbnailSize::Small) + { mParent->enableThumbSizeMinusAction(false); } mParent->enableThumbSizePlusAction(true); @@ -658,11 +668,13 @@ { AlbumIconItem *item; - if (!iconItem) { + if (!iconItem) + { item = mIconView->firstSelectedItem(); if (!item) return; } - else { + else + { item = iconItem; } @@ -678,11 +690,13 @@ { AlbumIconItem *item; - if (!iconItem) { + if (!iconItem) + { item = mIconView->firstSelectedItem(); if (!item) return; } - else { + else + { item = iconItem; } _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |