- fix crash when selecting frame (#604124)

This commit is contained in:
Dan Horák 2010-06-19 10:08:42 +00:00
parent a57d1df8dd
commit 892527afb3
3 changed files with 72 additions and 10 deletions

View File

@ -1,13 +1,15 @@
commit 169287c87dbf6beb6b1601eee377ca0465880120
Author: cbradney <cbradney@11d20701-8431-0410-a711-e3c959e3b870>
Date: Sun Jun 13 21:15:23 2010 +0000
From 7c270c455bdf6022f39f0f27be4325003f1aa1c4 Mon Sep 17 00:00:00 2001
From: cbradney <cbradney@11d20701-8431-0410-a711-e3c959e3b870>
Date: Sun, 13 Jun 2010 21:15:45 +0000
Subject: [PATCH] #8917: Force shapes icons in menus to have an icon so they show up on DEs that turn off icons by default
#8917: Force shapes icons in menus to have an icon so they show up on DE that turn off icons by default
git-svn-id: svn://scribus.info/Scribus/trunk@15184 11d20701-8431-0410-a711-e3c959e3b870
git-svn-id: svn://scribus.info/Scribus/branches/Version135@15185 11d20701-8431-0410-a711-e3c959e3b870
---
Scribus/scribus/autoformbuttongroup.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Scribus/scribus/ui/autoformbuttongroup.cpp b/Scribus/scribus/ui/autoformbuttongroup.cpp
index d68ddaf..e91389f 100644
diff --git a/Scribus/scribus/autoformbuttongroup.cpp b/Scribus/scribus/autoformbuttongroup.cpp
index f7e8267..8f67c78 100644
--- a/Scribus/scribus/autoformbuttongroup.cpp
+++ b/Scribus/scribus/autoformbuttongroup.cpp
@@ -79,6 +79,7 @@ AutoformButtonGroup::AutoformButtonGroup( QWidget* parent ) : QMenu( parent )
@ -18,3 +20,6 @@ index d68ddaf..e91389f 100644
connect(action, SIGNAL(triggered()), signalMapper, SLOT(map()));
signalMapper->setMapping(action, shapenum);
}
--
1.6.6.1

View File

@ -0,0 +1,51 @@
From 62684de1a0d3c400d6ecd3b06c8ffdcb49a1e90a Mon Sep 17 00:00:00 2001
From: jghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>
Date: Wed, 16 Jun 2010 19:56:30 +0000
Subject: [PATCH] #9180 : fix crash when selecting frame after modifying text in story editor
git-svn-id: svn://scribus.info/Scribus/branches/Version135@15199 11d20701-8431-0410-a711-e3c959e3b870
---
Scribus/scribus/pageitem_textframe.cpp | 4 ++--
Scribus/scribus/storyeditor.cpp | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Scribus/scribus/pageitem_textframe.cpp b/Scribus/scribus/pageitem_textframe.cpp
index 62c9ab5..e04b875 100644
--- a/Scribus/scribus/pageitem_textframe.cpp
+++ b/Scribus/scribus/pageitem_textframe.cpp
@@ -2364,7 +2364,7 @@ void PageItem_TextFrame::DrawObj_Item(ScPainter *p, QRectF cullingArea, double s
bool previousWasObject(false);
double selX = ls.x;
ScText *hls = 0;
- for (int as = ls.firstItem; as <= qMin(ls.lastItem, itemText.length()); ++as)
+ for (int as = ls.firstItem; as <= qMin(ls.lastItem, itemText.length() - 1); ++as)
{
bool selecteds = itemText.selected(as);
hls = itemText.item(as);
@@ -2424,7 +2424,7 @@ void PageItem_TextFrame::DrawObj_Item(ScPainter *p, QRectF cullingArea, double s
QColor tmp;
ScText *hl = 0;
- for (int a = ls.firstItem; a <= qMin(ls.lastItem, itemText.length()); ++a)
+ for (int a = ls.firstItem; a <= qMin(ls.lastItem, itemText.length() - 1); ++a)
{
hl = itemText.item(a);
const CharStyle& charStyle(itemText.charStyle(a));
diff --git a/Scribus/scribus/storyeditor.cpp b/Scribus/scribus/storyeditor.cpp
index 4f10599..ad3f349 100644
--- a/Scribus/scribus/storyeditor.cpp
+++ b/Scribus/scribus/storyeditor.cpp
@@ -2868,6 +2868,10 @@ void StoryEditor::updateTextFrame()
}
#endif
Editor->saveItemText(nextItem);
+ // #9180 : force relayout here, it appears that relayout is sometime disabled
+ // to speed up selection, but re layout() cannot be avoided here
+ nextItem->invalidateLayout();
+ nextItem->layout();
#if 0
QList<PageItem*> FrameItemsDel;
FrameItemsDel.setAutoDelete(true);
--
1.6.6.1

View File

@ -1,6 +1,6 @@
Name: scribus
Version: 1.3.7
Release: 2%{?dist}
Release: 3%{?dist}
Summary: DeskTop Publishing application written in Qt
@ -14,6 +14,9 @@ Patch0: %{name}-1.3.7-system-hyphen.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=603921
# http://bugs.scribus.net/view.php?id=8917
Patch1: %{name}-1.3.7-menuicons.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=604124
# http://bugs.scribus.net/view.php?id=9180
Patch2: %{name}-1.3.7-selecting-frame-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
@ -189,7 +192,10 @@ update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :
%changelog
* Tue Jun 15 2010 Dan Horák <dan@danny.cz> - 1.3.7-2
* Sat Jun 19 2010 Dan Horák <dan[AT]danny.cz> - 1.3.7-3
- fix crash when selecting frame (#604124)
* Tue Jun 15 2010 Dan Horák <dan[AT]danny.cz> - 1.3.7-2
- show icons in shapes menu (#603921)
* Fri Jun 4 2010 Dan Horák <dan[AT]danny.cz> - 1.3.7-1