Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
5e12569b
Commit
5e12569b
authored
13 years ago
by
Merov Linden
Browse files
Options
Downloads
Plain Diff
merge EXP-737
parents
0bc8b0fd
968a2679
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llpreviewtexture.cpp
+18
-16
18 additions, 16 deletions
indra/newview/llpreviewtexture.cpp
with
18 additions
and
16 deletions
indra/newview/llpreviewtexture.cpp
+
18
−
16
View file @
5e12569b
...
...
@@ -143,10 +143,7 @@ void LLPreviewTexture::onSaveAsBtn(void* data)
void
LLPreviewTexture
::
draw
()
{
if
(
mUpdateDimensions
)
{
updateDimensions
();
}
updateDimensions
();
LLPreview
::
draw
();
...
...
@@ -396,27 +393,32 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
void
LLPreviewTexture
::
updateDimensions
()
{
if
(
!
mImage
)
{
return
;
if
(
mImage
->
getFullWidth
()
==
0
||
mImage
->
getFullHeight
()
==
0
)
}
if
(
(
mImage
->
getFullWidth
()
*
mImage
->
getFullHeight
()
)
==
0
)
{
return
;
}
mUpdateDimensions
=
FALSE
;
getChild
<
LLUICtrl
>
(
"dimensions"
)
->
setTextArg
(
"[WIDTH]"
,
llformat
(
"%d"
,
mImage
->
getFullWidth
()));
// Update the width/height display every time
getChild
<
LLUICtrl
>
(
"dimensions"
)
->
setTextArg
(
"[WIDTH]"
,
llformat
(
"%d"
,
mImage
->
getFullWidth
()));
getChild
<
LLUICtrl
>
(
"dimensions"
)
->
setTextArg
(
"[HEIGHT]"
,
llformat
(
"%d"
,
mImage
->
getFullHeight
()));
//reshape floater
reshape
(
getRect
().
getWidth
(),
getRect
().
getHeight
());
// Reshape the floater only when required
if
(
mUpdateDimensions
)
{
mUpdateDimensions
=
FALSE
;
//reshape floater
reshape
(
getRect
().
getWidth
(),
getRect
().
getHeight
());
gFloaterView
->
adjustToFitScreen
(
this
,
FALSE
);
gFloaterView
->
adjustToFitScreen
(
this
,
FALSE
);
LLRect
dim_rect
(
getChildView
(
"dimensions"
)
->
getRect
());
LLRect
aspect_label_rect
(
getChildView
(
"aspect_ratio"
)
->
getRect
());
getChildView
(
"aspect_ratio"
)
->
setVisible
(
dim_rect
.
mRight
<
aspect_label_rect
.
mLeft
);
LLRect
dim_rect
(
getChildView
(
"dimensions"
)
->
getRect
());
LLRect
aspect_label_rect
(
getChildView
(
"aspect_ratio"
)
->
getRect
());
getChildView
(
"aspect_ratio"
)
->
setVisible
(
dim_rect
.
mRight
<
aspect_label_rect
.
mLeft
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment